#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :read_data.py
# @Time      :2021/8/2 17:15
# @author    :Harry
import random
import csv

def get_random_str():
    alphabet = 'abcdefghijklmnopqrstuvwxyz!@#$%^&*()'
    d = random.choice(alphabet)
    m = random.sample(alphabet,5)
    print(d, m )
    return d
get_random_str()

def get_random_int(a, b):
    '''参数化：随机数'''
    num = random.randint(a, b)
    return num

def get_text_data():
    pass
    data = ''
    return data

def get_csv_data(filename):
    f = open(filename, 'r')
    datas = csv.reader(f)
    list_data = []
    for data in datas:
        list_data.append(data)
    print(list_data)
    data = random.choice(list_data)
    print(data)
    return data

def get_db_data():
    pass
